<?php
/**
 * Created by PhpStorm.
 * User: xuan
 * Date: 2017/9/6
 * Time: 10:31
 */
require 'hash.php';

function addServer($servers)
{
    $obj = new ConsistentHashing();
    foreach ($servers as $v)
    {
        $obj->addNode($v);
    }
}

addServer(array('127.0.0.1:6379','127.0.0.1:6381'));
echo 'ok';